package com.cms.service;

import java.util.List;

import com.cms.model.AppPointTerraceInfo;
import com.cms.model.AppVersionInfo;
import com.cms.model.AppversionTerraceInfo;

public interface AppVersionInfoService {
	public List<AppVersionInfo> getAppVersionInfos();
	public AppVersionInfo getAppVersionInfoById(int id);
	public List<AppVersionInfo> getAppVersionInfoByAppNumber(String appNumber);
	public List<AppVersionInfo> getAppVersionInfoByAppVersionNumber(String appVersionNumber);
	public boolean saveAppVersionInfo(AppVersionInfo model);
	public boolean updateAppVersionInfo(AppVersionInfo model);
	public boolean updateAppVersionRecommend(AppVersionInfo model);
	public boolean deleteAppVersionInfo(AppVersionInfo model);
	public boolean deleteAppVersionInfo1(AppVersionInfo model);
	public boolean saveAppVersionInfoStatus(AppVersionInfo model);
	public boolean updateAppVersionFile(AppVersionInfo model);
	
	/**
	 * 根据应用版本Id查找平台信息
	 * @param channelId
	 * @return
	 */
	public List<AppversionTerraceInfo> getByAppversionId(Integer appversionId);
	
	//更新应用版本与平台信息
	public boolean updateAppversionTerraceInfo(AppVersionInfo appVersion,List<AppversionTerraceInfo> appversionTerraceInfos ,List<AppPointTerraceInfo> apppointTerraceInfos);
	
	//添加应用版本信息时,且添加应用版本平台关联信息和应用计费点信息
	public boolean insertAppversionTerraceInfo(AppVersionInfo appVersion,List<AppversionTerraceInfo> appversionTerraceInfos,List<AppPointTerraceInfo> apppointTerraceInfos);
	/**
	 * 查找版本平台关联信息
	 * @param channelId
	 * @return
	 */
	public List<AppversionTerraceInfo> queryAppversionTerrace();
	/**
	 * 根据appnumber查找版本平台关联信息
	 * @param appnumber
	 * @return
	 */
	public List<AppversionTerraceInfo> queryAppversionTerraceByAppNumber(String appNumber);
	public List<AppversionTerraceInfo> queryApvtByAppnumberAndTerraceId(String appnumber,String terraceId);
	/**
	 * 查找版本下的所有计费点平台信息
	 * @return
	 */
	public List<AppPointTerraceInfo> queryAppPointTerraceInfo();
	/**
	 * 根据appnumber查找版本下的所有计费点平台信息
	 * @return
	 */
	public List<AppPointTerraceInfo> queryAppPointTerraceInfoByAppNumber(String appNumber);
	/**
	 * 根据appnumber查找版本下的所有计费点平台信息
	 * @return
	 */
	public List<AppPointTerraceInfo> queryAppPointTerraceInfoByAppVersionId(int appversionId);
}
